using System;
using System.Collections.Generic;
using System.Text;
namespace GSM.BusinessLayer
{
	public class Promotion: BusinessObjectBase
	{

		#region InnerClass
		public enum PromotionFields
		{
			PromotionID,
			PromotionContent,
			ExpirationDate,
			Type
		}
		#endregion

		#region Data Members

			int _promotionID;
			string _promotionContent;
			DateTime? _expirationDate;
			string _type;

		#endregion

		#region Properties

		public int  PromotionID
		{
			 get { return _promotionID; }
			 set
			 {
				 if (_promotionID != value)
				 {
					_promotionID = value;
					 PropertyHasChanged("PromotionID");
				 }
			 }
		}

		public string  PromotionContent
		{
			 get { return _promotionContent; }
			 set
			 {
				 if (_promotionContent != value)
				 {
					_promotionContent = value;
					 PropertyHasChanged("PromotionContent");
				 }
			 }
		}

		public DateTime?  ExpirationDate
		{
			 get { return _expirationDate; }
			 set
			 {
				 if (_expirationDate != value)
				 {
					_expirationDate = value;
					 PropertyHasChanged("ExpirationDate");
				 }
			 }
		}

		public string  Type
		{
			 get { return _type; }
			 set
			 {
				 if (_type != value)
				 {
					_type = value;
					 PropertyHasChanged("Type");
				 }
			 }
		}


		#endregion

		#region Validation

		internal override void AddValidationRules()
		{
			ValidationRules.AddRules(new Validation.ValidateRuleNotNull("PromotionID", "PromotionID"));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("PromotionContent", "PromotionContent",200));
			ValidationRules.AddRules(new Validation.ValidateRuleStringMaxLength("Type", "Type",200));
		}

		#endregion

	}
}
